<template>
  <view class="member-section" :style="[outModuleCss]">
    <view :style="[moduleBgCss]" class="module-bg"></view>

    <defaultTem
      v-if="styleType == 1"
      :propsData="propsData"
      :userInfo="userInfo"
      :myInfo="myInfo"
    ></defaultTem>
    <!-- 模板二 -->
    <columnTem
      v-if="styleType == 2"
      :propsData="propsData"
      :userInfo="userInfo"
      :myInfo="myInfo"
    ></columnTem>
  </view>
</template>

<script>
import { diySysPageMixin } from "../../mixins/index";
import defaultTem from "./templates/defaultTem.vue";
import columnTem from "./templates/column.vue";

export default {
  props: {
    propsData: {
      type: Object,
      default: () => {
        return {};
      }
    },
    myInfo: {
      type: Object,
      default: () => {
        return {};
      }
    }
  },
  components: {
    defaultTem,
    columnTem
  },
  mixins: [diySysPageMixin], //混入文件
  watch: {},
  data() {
    return {
      userInfo: {}
    };
  },
  computed: {
    styleType() {
      return this.propsData.params.styleType;
    }
  },
  methods: {},
  filters: {},
  mounted() {
    let userInfo = uni.getStorageSync("userInfo");
    if (userInfo && userInfo?.access_token) {
      this.userInfo = userInfo;
    }
  }
};
</script>

<style scoped lang="scss">
.member-section {
  width: 100%;
  position: relative;
  .module-bg {
    width: 100%;
    height: 100%;
    z-index: -1;
    position: absolute;
    left: 0;
    top: 0;
  }
}
</style>
